<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix='fmt' uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<% 
response.setHeader("Pragma","No-cache"); 
response.setHeader("Cache-Control","no-cache"); 
response.setDateHeader("Expires", 0); 
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!doctype html>
<html lang="zh-cn">
  <head>
  	<base href="<%=basePath %>" />
    <meta charset="utf-8">
    <title>${siteTitle}</title>
    <meta name="keywords" content="${siteKeyword}">
    <meta name="description" content="${siteDescript}">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
    <link rel="shortcut icon" href="static/favicon.ico"><!-- 浏览器图标 -->
	<link href="//cdn.bootcss.com/material-design-lite/1.3.0/material.blue-pink.min.css" rel="stylesheet"><!-- 主题颜色 -->
    <link href="//fonts.googleapis.com/css?family=Roboto:regular,bold,italic,thin,light,bolditalic,black,medium&amp;lang=en" rel="stylesheet" type="text/css"><!-- 字体 -->
    <link href="//fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"><!-- 图标 -->
    <link href="static/css/front/frame.css" rel="stylesheet">
    <script src="//cdn.bootcss.com/material-design-lite/1.3.0/material.min.js"></script>
    <script src="//cdn.bootcss.com/pace/1.0.2/pace.min.js"></script><!-- 页面同步加载进度条 -->
    <script src="//cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script>
    <script>
        var basePath = "<%=basePath %>";
        //文件域名配置
        var fileDomainName="${applicationScope.fileDomainName}";
    </script>
    <script src="static/js/front/frame.js"></script>
  </head>
  <body class="layouthide" style="background: rgb(238, 238, 238);">
        <div class="layoutmain mdl-layout--fixed-header">
        	<header class="mdl-layout__header" style="position: absolute;">
        	    <div onclick="menutogater();" class="mdl-layout__drawer-button  mdl-js-button mdl-js-ripple-effect"><i class="material-icons"></i></div>
                <!-- Top row, always visible -->
                <div class="mdl-layout__header-row">
                  <!-- Title -->
                  <a   href="" class="layouthideJump mdl-layout-title ">HMYUAN</a>
                  <a id="toptitle" style="font-size: 20px;font-weight: 500;margin-left: 200px;color: #fff;border-left: 1px solid rgba(255, 255, 255, 0.2);padding-left: 20px;    position: absolute;top: 50%;margin-top: -10px;">
                  		首页
                  </a>
                  <div class="mdl-layout-spacer"></div>
                  <!-- Colored FAB button with ripple -->
                  <button onclick="$('.layoutcontent').animate({scrollTop: 0}, 200);" class="mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect mdl-button--colored mdl-shadow--4dp topbutton">
                      <i class="material-icons">&#xE255;</i>
                  </button>
                  <div class="mdl-textfield mdl-js-textfield mdl-textfield--expandable
                              mdl-textfield--floating-label mdl-textfield--align-right">
                    
                    <label class="mdl-button mdl-js-button mdl-button--icon"
                           for="waterfall-exp">
                      <i class="material-icons">search</i>
                    </label>
                    <div class="mdl-textfield__expandable-holder">
                    	<form action="search">
	                      <input class="mdl-textfield__input" type="text" name="title"
	                      	style="background: rgba(33, 150, 243, 0.6);"
	                             id="waterfall-exp" />
                    	</form>
                    </div>
                  </div>
                </div>
          </header>
          <div class="layoutmenu left100">
          	<table style="height:100%;width: 100%;">
          		<tr><td valign="top">
	          		<div style='height:16px;'>
	                </div>
	          		<nav class="mdl-navigation">
				      <!-- <a class="layouthideJump mdl-navigation__link mdl-navigation__link--current" href="" ><i class="material-icons">&#xE88A;</i>首页</a>
	       			  <hr style='margin: 0px 0;border-top: 1px solid rgba(0,0,0,0.1);'> -->
	       			  <!-- 链接单页面 -->
				      <c:forEach var="t" items="${applicationScope.headPageList}" varStatus="status">
				      	<c:if test="${t.type!=100}">
		      			      <a class='navflag${fn:replace(t.topimg, "/", "")} layouthideJump mdl-navigation__link' title="${t.title}" href="${t.topimg}" ><i class="material-icons">&#x${t.summary};</i>${t.title}</a>
				      	</c:if>
				      </c:forEach>
	       			  <hr style='margin: 0px 0;border-top: 1px solid rgba(0,0,0,0.1);'>
	       			  <!-- 目录列表 -->
				      <c:forEach var="t" items="${applicationScope.headPageCategoryList}" varStatus="status">
	      			      <a class='navflagCategory${t.id} layouthideJump mdl-navigation__link' title="${t.name}" href="category/${t.id}/${t.name}" ><i class="material-icons">&#xE8ED;</i>
	      			      	<span  class="mdl-badge" data-badge="${t.count}">${t.name}</span>
	      			      </a>
				      </c:forEach>
	       			  <hr style='margin: 0px 0;border-top: 1px solid rgba(0,0,0,0.1);'>
	       			  <!-- 可编辑单页面 -->
				      <c:forEach var="t" items="${applicationScope.headPageList}" varStatus="status">
				      	<c:if test="${t.type==100}">
		      			      <a class="navflag${t.password} layouthideJump mdl-navigation__link" title="${t.title}" href="page/${t.password}" ><i class="material-icons">&#x${t.summary};</i>${t.title}</a>
				      	</c:if>
				      </c:forEach>
				    </nav>
				    <script type="text/javascript">
				    	$(function(){
				    		if("${titleset}"==""){
					    		$(".mdl-navigation__link").each(function(){
					    			if($(this).hasClass('navflag${fn:replace(navflag, "/", "")}')){
					    				$(this).addClass("mdl-navigation__link--current");//左侧菜单添加选中效果
					    				$("#toptitle").html($(this).attr("title"));//top标题
					    			}
					    		});
				    		}else{
			    				$("#toptitle").html("${titleset}");//top标题
			    				$(".mdl-navigation__link").each(function(){
					    			if($(this).hasClass('navflagCategory${searchtitle}')){
					    				$(this).addClass("mdl-navigation__link--current");//左侧菜单添加选中效果
					    			}
					    		});
				    		}
				    	});
				    </script>
          		</td></tr>
          		<tr><td valign="bottom">
	          		<hr style='margin: 0px 0;border-top: 1px solid rgba(0,0,0,0.1);'>
				    <div style="padding: 20px;font-size: 12px;color:#aaa;">
				    	All Rights Reserved © 2017 hmyuan.com <br>
						京ICP备17007521号-1
				    </div>
          		</td></tr>
          	</table>
          </div>
          <div class="layoutcontent top100" align="center">
